package hu.mapro.gwtui.client.model;

import com.google.gwt.cell.client.Cell;

public abstract class EnumProperty<T, E extends Enum<E>> extends AbstractDisplayableProperty<T, E> {

	private LabelProvider<? super E> labelProvider;

	public EnumProperty(String propertyName, String label,
			LabelProvider<? super E> labelProvider) {
		super(propertyName, label);
		this.labelProvider = labelProvider;
	}

	public EnumProperty(String propertyName, String label) {
		super(propertyName, label);
	}

	@Override
	public Cell<E> getDisplayField() {
		return new LabelProviderCell<E>(labelProvider);
	}

}
